home *** CD-ROM | disk | FTP | other *** search
/ Amiga MA Magazine 1998 #3 / amigamamagazinepolishissue1998.iso / maksiu / lists / amoslist-1295.lzh / AMOSLIST / 000011_amos-request@svcs1.digex.net_Tue Dec 5 16:40:16 1995.msg < prev    next >
Internet Message Format  |  1995-12-31  |  2KB

  1. Received: from svcs1.digex.net (svcs1.digex.net [204.91.197.224]) by mail1.access.digex.net (8.6.12/8.6.12) with ESMTP id QAA09072;  for <mcox@access.digex.net> ; Tue, 5 Dec 1995 16:40:15 -0500
  2. Received: (from daemon@localhost) by svcs1.digex.net (8.6.12/8.6.12) id PAA10275 for amos-out; Tue, 5 Dec 1995 15:16:25 -0500
  3. Received: from mail1.access.digex.net (mail1.access.digex.net [205.197.247.2]) by svcs1.digex.net (8.6.12/8.6.12) with ESMTP id PAA10262 for <amos-list@svcs1.digex.net>; Tue, 5 Dec 1995 15:16:20 -0500
  4. Received: from dragon.res.cmu.edu (root@DRAGON.RES.CMU.EDU [128.2.93.39]) by mail1.access.digex.net (8.6.12/8.6.12) with ESMTP id PAA25373;  for <amos-list@access.digex.net> ; Tue, 5 Dec 1995 15:16:17 -0500
  5. Received: from dragon.res.cmu.edu (achurch@Lessa [192.168.1.1]) by dragon.res.cmu.edu (8.6.9/8.6.9) with SMTP id PAA16707 for <amos-list@access.digex.net>; Tue, 5 Dec 1995 15:17:35 GMT
  6. From: achurch@dragon.res.cmu.edu (Andy Church)
  7. To: amos-list@access.digex.net
  8. Subject: Re: Image Processing
  9. Date: Tue Dec 05 15:16:08 1995
  10. Message-ID: <199512051516.AA19840@dragon.res.cmu.edu>
  11. X-Mailer: MMail v4.30
  12. Status: RO
  13. X-Status: 
  14.  
  15. >However I don't know how to read the luminance from a pixel. All I can
  16. >do is use C=point(x,y) to get an apparently arbitrary colour number. To
  17. >complicate matters the animation is in HAM. Can someone help me with
  18. >this?
  19.  
  20.   The way I'd do it is this.  First find the R, G, and B values for each
  21. pixel.  Then imagine a cube with a side length of 16 (or 256, depending on
  22. how much color data you have) and, for each pixel, find the "distance"
  23. between the point (0,0,0) and the point (R,G,B); in other words, calculate
  24. sqrt(R*R + G*G + B*B).  That results in a "luminance" value from zero to 16
  25. (or 256).  To save time, you can cut out the square root step and just work
  26. with the square of the luminance.  I don't know whether there's a better
  27. method, or even whether this method is an accepted way of doing this - but
  28. it's what I'd do.  Shrug.
  29.  
  30.   --Andy Church (achurch@cmu.edu)
  31.     WWW: http://mmm.mbhs.edu/cgi-bin/achurch/